<template>
    <div class="salesIndex">
        <header-vue/>
        <ElRow type="flex" justify="center">
          <ElCol :span="18" style="margin-top:50px">
              <column-vue v-for="item,i in list.slice(0,5)" :key="i" :title="item.title" :text="item.text?item.text:''">
                <item-vue style="width:238px" v-for="item2,ii in item.list" :key="ii" :data="item2"></item-vue>
              </column-vue>
                <tag-col-vue v-for="item,i in list.slice(5,10)" :key="i" :title="item.title" :tags="item.tags" :imgurl="item.imgurl" :def="item.def"/>
          </ElCol>
        </ElRow>
    </div>
</template>
<script>
import headerVue from './compontens/header.vue'
import api from '@/api/sales'
import columnVue from '../../components/sales/column.vue'
import itemVue from '../../components/sales/item.vue'
import TagColVue from '../../components/sales/TagCol.vue'

export default {
    data () {
        return {
            list:[]
        }
    },
    components: {
        headerVue,
        columnVue,
        itemVue,
        TagColVue
    },
    created () {
        this.init()
    },
    methods: {
        init(){
            api.getSalesInfo().then(res=>{
                console.log("自由行data=>>",res);
                this.list = res.calendarList
            })
        }
    }
}

</script>
<style lang="scss" scoped>
</style>